#ifndef __ACI_IMP_RSP_H__
#define __ACI_IMP_RSP_H__

#include "tapi_aci_cmh.h"
#include "vmapiidx.h"
#include "tlist.h"

#define VM_GR_NONE                                  0x00000000
#define VM_GR_OK                                    0x00000001
#define VM_GR_CME                                   0x00000002
#define VM_GR_CMS                                   0x00000004
#define VM_GR_CMGR                                  0x00000010
#define VM_GR_CMGS                                  0x00000020
#define VM_GR_CPMS                                  0x00000040
#define VM_GR_CSIM                                  0x00000080
#define VM_GR_CCWA                                  0x00000100
#define VM_GR_CLIR                                  0x00000200
#define VM_GR_CCFC                                  0x00000400
#define VM_GR_CMGW                                  0x00000800
#define VM_GR_CPOL                                  0x00001000
#define VM_GR_CLCK                                  0x00002000
#define VM_GR_COPS                                  0x00004000
#define VM_GR_CRSM                                  0x00008000
#define VM_GR_CPIN                                  0x00010000

typedef struct VM_ADDITIONAL_DATA {
    VM_ADDITIONAL_DATA() : value(0), additional(NULL) {}
    int value;
    void *additional;
} VM_ADDITIONAL_DATA;

typedef struct VM_RESPONSE_INTERNAL {
    int type;
    T_ACI_AT_CMD cmdId;
    VM_ADDITIONAL_DATA data;
} VM_RESPONSE_INTERNAL;

typedef TList<VM_RESPONSE_INTERNAL>                 VM_RESPONSEQUEUE;

typedef TList<VM_INDICATOR>                         VM_INDICATORQUEUE;

typedef struct VM_SYSTEM_STATUS {
    volatile int monitorIndicator;
    volatile T_ACI_PB_STAT pbStatus;
} VM_SYSTEM_STATUS;

void init_ACI_response();

void cleanResponseCache(T_ACI_AT_CMD cmdId);
int getGeneralResponse(
    T_ACI_AT_CMD cmdId, int timeout, VM_RESPONSE *data, int *retType);
int getIndicatorMessage(struct VM_INDICATOR *ind);

#endif /* __ACI_IMP_RSP_H__ */

